package org.example.completed.service.impl;

import org.example.completed.domain.AnimalCategory;
import org.example.completed.mapper.AnimalMapper;
import org.example.completed.service.AnimalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AnimalServiceImpl implements AnimalService {

    private final AnimalMapper animalMapper;

    @Autowired
    public AnimalServiceImpl(AnimalMapper animalMapper) {
        this.animalMapper = animalMapper;
    }

    @Override
    public List<AnimalCategory> getAllAdoptableAnimals() {
        return animalMapper.getAllAdoptableAnimals(); // 获取所有可领养的动物
    }
}
